//
//  RecommedCell.m
//  BurnFat
//
//  Created by lanou3g on 16/5/8.
//  Copyright © 2016年 ZhaoYingWei. All rights reserved.
//

#import "RecommedCell.h"
#import "Userinfo.h"
#import "RecomedModel.h"
#import "ReDetailModel.h"
#import "UIButton+IndexPath.h"
#import <SDWebImage/UIImageView+WebCache.h>

@interface RecommedCell ()
@property (weak, nonatomic) IBOutlet UILabel *NickNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *SexLabel;
@property (weak, nonatomic) IBOutlet UILabel *Introduce;
@property (weak, nonatomic) IBOutlet UIImageView *leftVideoImageView;
@property (weak, nonatomic) IBOutlet UIImageView *rightVideoImageView;
@property (weak, nonatomic) IBOutlet UIImageView *IconView;

@end
@implementation RecommedCell
- (IBAction)RecommedAction:(UIButton *)sender
{
    
    if (self.delegate) {
        [self.delegate cellBeClicedWith:self];
    }
}


-(void)awakeFromNib
{
    self.layer.borderColor =[UIColor lightGrayColor].CGColor;
    self.layer.borderWidth = 1;
   
}
-(void)setSelected:(BOOL)selected
{
    [super setSelected:selected];
 
}
-(void)setModels:(RecomedModel *)models
{
    _models = models;
  self.NickNameLabel.text =  _models.userInfo.userName;
   self.SexLabel.text = [models.userInfo.sex isEqualToString:@"1"]?@"男":@"女";
    self.Introduce.text = models.recomDesc;
    [self.IconView sd_setImageWithURL:[NSURL URLWithString:models.userInfo.portrait]];
    ReDetailModel *m1 =  models.picinfo[0];
    [self.leftVideoImageView sd_setImageWithURL:[NSURL URLWithString:m1.thumbnailUrl]];
    ReDetailModel *m2 =  models.picinfo[1];
    [self.rightVideoImageView sd_setImageWithURL:[NSURL URLWithString:m2.thumbnailUrl]];
    
}
@end
